TimePunch Customer Service
This service provides an interface for accessing the customer data that are stored in TimePunch.
CreateCustomer
This method creates a new customer object and returns it. The customer data won’t be stored in the database.
CustomerDto CreateCustomer(
out TpFault fault,
TpAuthentication authentication);
Needed Permission | customers@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
Return value | New CustomerDTO object with the preset of customer data. |
SaveCustomers
This method saves the customer to the database and returns the stored data as a result again.
CustomerDto[] SaveCustomers(
out TpFault fault,
TpAuthentication authentication,
CustomerDto[] customers);
Needed Permission | customers@import | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
customers | Array of customer data to store in the database | |
Return value | The customer data that has been stored in the database. |
ImportCustomers
This method imports the given customer data in the database. The difference to the save method is that the customer data is identified with the customers Ref Nr and the Name, instead of the Id.
CustomerDto[] ImportCustomers(
out TpFault fault,
TpAuthentication authentication,
CustomerDto[] customers);
Needed Permission | customers@import | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
customers | Array of customer data to import in the database | |
Return value | The customer data that has been stored in the database. |
LoadCustomers
This method loads the customer data with the passed customer ids. The method should be preferred to the search, if the IDs of the customer data are known.
CustomerDto[] LoadCustomers(
out TpFault fault,
TpAuthentication authentication,
Guid[] customerIds);
Needed Permission | customers@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
customerIds | Array of customer ids to load from the database | |
Return value | The customer data that has been loaded from the database. |
MarkCustomersAsDeleted
This method marks the customer data as deleted. But the data won't be physically deleted.
void MarkCustomersAsDeleted(
out TpFault fault,
TpAuthentication authentication,
Guid[] customerIds);
Needed Permission | customers@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
customerIds | Array of customer ids to mark as deleted in database |
DeleteCustomers
This method attempts to physically delete the customer's data in the database. If the customer is already in use, the physical deletion is no longer possible. In this case, the customer should only be marked as deleted.
void DeleteCustomers(
out TpFault fault,
TpAuthentication authentication,
Guid[] customerIds);
Needed Permission | customers@manage | |
---|---|---|
Name | Modifier | Description |
Fault | Out | Contains the error if an exception occurs. |
Authentication | User authentication | |
customerIds | Array of customer ids to physically delete in database |
SearchCustomers
This method searches for all customers on the basis of the specified search object.
CustomerDto[] SearchCustomers(
out TpFault fault,
TpAuthentication authentication,
CustomerSearchDto templateCustomer);
Needed Permission | customers@access | |
---|---|---|
Name | Modifier | Description |
Fault | Out | Contains the error if an exception occurs. |
Authentication | User authentication | |
templateCustomer | Search object that holds the properties used for searching the real customers | |
Return value | Found customer data |
SearchActiveCustomers
This method searches for all active customers on the basis of the specified search object.
CustomerDto[] SearchCustomers(
out TpFault fault,
TpAuthentication authentication,
CustomerSearchDto templateCustomer);
Needed Permission | customers@access | |
---|---|---|
Name | Modifier | Description |
Fault | Out | Contains the error if an exception occurs. |
Authentication | User authentication | |
templateCustomer | Search object that holds the properties used for searching the real customers | |
Return value | Found customer data |